For testing purposes, we may want to force the creation of legacy GL
contexts via an environment variable.
https://bugzilla.gnome.org/show_bug.cgi?id=756142
{"software-draw-gl", GDK_GL_SOFTWARE_DRAW_GL},
{"software-draw-surface", GDK_GL_SOFTWARE_DRAW_SURFACE},
{"texture-rectangle", GDK_GL_TEXTURE_RECTANGLE},
+ {"legacy", GDK_GL_LEGACY},
};
#ifdef G_ENABLE_DEBUG
GDK_GL_ALWAYS = 1 << 1,
GDK_GL_SOFTWARE_DRAW_GL = 1 << 2,
GDK_GL_SOFTWARE_DRAW_SURFACE = 1 << 3,
- GDK_GL_TEXTURE_RECTANGLE = 1 << 4
+ GDK_GL_TEXTURE_RECTANGLE = 1 << 4,
+ GDK_GL_LEGACY = 1 << 5
} GdkGLFlags;
extern GList *_gdk_default_filters;
compat_bit = gdk_gl_context_get_forward_compatible (context);
/* If there is no glXCreateContextAttribsARB() then we default to legacy */
- legacy_bit = !GDK_X11_DISPLAY (display)->has_glx_create_context;
+ legacy_bit = !GDK_X11_DISPLAY (display)->has_glx_create_context ||
+ (_gdk_gl_flags & GDK_GL_LEGACY) != 0;
/* We cannot share legacy contexts with core profile ones, so the
* shared context is the one that decides if we're going to create